/************************************************************************/
/* Name : Kiwon Yun
/* Partner's name : Eric Rooney
/* File Name : GameInfo.h
/* The name of assignment : Iteration 2
/************************************************************************/

#ifndef GAMEINFO_H
#define GAMEINFO_H

#include "Common.h"

/************************************************************************/
/* GameInfo class manages game informations.
/* This class is made for getting game informations easily,
/* even though dealer class know every information about the game.
/* To get a game information is possible everywhere because this class 
/* is made by the singleton pattern.
/************************************************************************/

class Dealer;
class GameInfo : public Singleton<GameInfo>
{
public:
	GameInfo(void);
	virtual ~GameInfo(void);

	/************************************************************************/
	/* Initialize dealer
	/************************************************************************/
	void Init( Dealer* a_pDealer );

	/************************************************************************/
	/* Set start game flag to true or false
	/************************************************************************/
	void SetStartGame( bool a_bStartGame );
	/************************************************************************/
	/* Set end game flag to true or false
	/************************************************************************/
	void SetEndGame( bool a_bEndGame );

	/************************************************************************/
	/* Return whether game has just begun
	/************************************************************************/
	bool IsStartGame();
	/************************************************************************/
	/* Return whether game has just ended
	/************************************************************************/
	bool IsEndGame();

	/************************************************************************/
	/* Save the winner's name
	/************************************************************************/
	void SetWinnerName( char* a_strWinnerName );
	/************************************************************************/
	/* Return the winner's name
	/************************************************************************/
	char* GetWinnerName();

	/************************************************************************/
	/* Increment the round counter
	/************************************************************************/
	void AddRound();
	/************************************************************************/
	/* Return the current round
	/************************************************************************/
	int GetRound();

private:
	//pointer to the dealer
	Dealer* m_pDealer;

	//flag to mark start of game
	bool m_bStartGame;
	//flag to mark end of game
	bool m_bEndGame;

	//store the winner's name
	char* m_strWinnerName;
	//store the round number
	int m_nRoundNum;
};

#endif

